package com.xh.bussiness.practice.service;



import com.xh.bussiness.practice.bean.dto.PracticeStudentAnalyseDto;
import com.xh.bussiness.practice.bean.dto.PracticeStudentResultDTO;
import com.xh.bussiness.practice.bean.dto.PracticeStudentResultDetailDTO;
import com.xh.bussiness.practice.bean.dto.SubmitPracticeResultDto;
import com.xh.bussiness.practice.bean.request.CorrectPracticeStudentRequest;
import com.xh.bussiness.practice.bean.request.PracticeRequest;
import com.xh.bussiness.practice.bean.request.PracticeStudentRequest;
import com.xh.bussiness.practice.model.PracticeStudent;
import com.xh.bussiness.practice.model.PracticeStudentResult;
import com.xh.core.service.IBaseService;
import com.xh.core.bean.XhPage;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 学生作业表 服务类
 * </p>
 *
 * @author Pitt
 * @since 2021-01-26
 */
public interface IPracticeStudentService extends IBaseService<PracticeStudent> {

    /**
     * 分页查询方法
     * @param page
     * @param bean
     * @return
     */
    public XhPage queryPracticeStudentPage(XhPage page, PracticeStudentRequest bean);

    /**
     * 查询方法
     * @param bean
     * @return
     */
    public List queryPracticeStudent(PracticeStudentRequest bean);

    void deleteByPracticeId(String practiceId);

    List<PracticeStudent> queryByPracticeId(String practice);

    XhPage queryPracticeStudentPageByStudentId(PracticeStudentRequest bean);

    List<PracticeStudentResultDTO> queryPracticeStudentDetail(String studentId, String practiceId);

    void submitPracticeStudentResult(SubmitPracticeResultDto practiceResultDto);

    void modifyCorrectPracticeStudent(CorrectPracticeStudentRequest bean);

    PracticeStudentAnalyseDto queryPracticeStudentReport(String practiceId, String studentId);

    PracticeStudentResultDetailDTO queryPracticeStudentResult(String practiceId, String studentId);

    PracticeStudent commentStudentPractice(String practiceId, String studentId, double score, String comment);

    Map<String,Object> queryPracticeDetails(String practiceId, String studentId);

    /**
     * 查询普通作业合格率
     * @author 赵文博
     * @date 2021/4/23 13:47
     * @param practiceId
     * @return double
     **/
    double queryNormalQualified(@Param("practiceId") String practiceId);

    /**
     * 查询普通作业优秀率
     * @author 赵文博
     * @date 2021/5/20 17:36
     * @param practiceId
     * @return double
     **/
    Double queryNormalProficiency(@Param("practiceId") String practiceId);

    /**
     * 查询学生作业状态及该状态的数量
     * @author 赵文博
     * @date 2021/5/7 15:05
     * @param practiceId
     * @return java.util.List<com.xh.bussiness.practice.model.PracticeStudent>
     **/
    List<PracticeStudent> queryPracticeStudentStatusCount(String practiceId);
}
